<!--<?php
include_once PrintEot('left');
print <<<EOT
-->
<script type="text/javascript" src="js/core/core.js"></script>
<style type="text/css">
.tr3 .wid{width:40px;text-align:left;}
.open,.close{width:12px;height:12px;margin:6px 6px 6px 0;cursor:pointer;overflow:hidden;}
.open{background:url($imgpath/admin/setfourm/fourm.gif) 0 0 no-repeat;}
.close{background:url($imgpath/admin/setfourm/fourm.gif) 0 -12px no-repeat;}
.fourm-two{float:left;}

.popoutContent{background:#fff;border:1px solid #4680b6;}
.bgcorner1,.bgcorner2,.bgcorner3,.bgcorner4,.pobg1,.pobg2,.pobg3,.pobg4{filter:Alpha(opacity=80);_filter:Alpha(opacity=80);opacity:.8;overflow:hidden; z-index:1005; line-height:0 }
.bgcorner1,.bgcorner2,.bgcorner3,.bgcorner4{width:5px;height:5px;background:url($imgpath/pwicon/bgcorner.gif) no-repeat;}
.bgcorner1{background-position: 0 0 }
.bgcorner2{background-position: -5px 0 }
.bgcorner3{background-position: -5px -5px}
.bgcorner4{background-position:0 -5px}
.pobg1,.pobg2,.pobg3,.pobg4{ background:#799fc3;}
.pobg1{height:5px; }
.pobg2{width:5px;}
.pobg3{height:5px;}
.pobg4{width:5px;}
.popoutContent td{padding:.5em .6em;border-bottom:1px solid $tdcolor;}

.h{border-bottom:1px solid $headborder;background:$headcolor;text-align:left;color:$headfontone;padding:2px .5em 0; line-height:220%;}
.h span{font-weight:normal;}
.h h2{font-weight:bold}
.h a{font-family:Arial;color:$headfontone}
.h span a,.h span{color:$headfonttwo;}

.mode-one{padding:10px;width:700px;border:1px solid #eeeeee;background:#fff;margin-top:10px;}
.mode-one dt{float:left;width:380px; text-align:right;padding-right:10px;}
.mode-one dd{float:left;;line-heigh:24px;width:305px;}
.mode-one dd strong{ font-weight:700;}
.mode-one dd .fr a{margin-left:2em;}
.mode-one dd li{padding:4px 0;}
</style>
<script src="js/pw_ajax.js" language="JavaScript"></script>
<script src="js/global.js" language="JavaScript"></script>
<script language="JavaScript" src="js/color_picker.js"></script>
<style type="text/css">
.pwnew span{float:left;margin-left:5px;}
.pwnew a{padding:0;margin:0;display:block;height:16px;width:16px;float:left;line-height:16px;border:1px solid #dbe4e9;color:#333333;cursor:pointer;}
.pwnew a:hover{border:1px solid #b0c8e0;background:#f9f9f9;color:#333333;}
.pwnew .one,.pwnew .one:hover{border: 1px solid #333333;background:#cde2f6;color:#333333;}
.pwnew b:hover,.pwnew i:hover{text-decoration:none;}
.pwnew .two{background:url($imgpath/menu-down.gif) right center no-repeat;width:30px;cursor:pointer;}
.pwnew .two:hover{background:$forumcolortwo url($imgpath/menu-down.gif) right center no-repeat;text-decoration:none;}
</style>
<div class="nav3 mb10">
    <ul id="basictype" class="cc">
        <li><a href="$basename" hidefocus="true">楼盘管理</a></li>
		<li class="current"><a href="$basename&action=edit&hid=$hid" hidefocus="true">编辑楼盘</a></li>
    </ul>
</div>
<div class="nav4 mb10">
    <ul class="cc">
        <li><a href="$basename&action=edit&hid=$hid" hidefocus="true">基本信息</a></li>
		<li><a href="$basename&action=album&hid=$hid" hidefocus="true">相册</a></li>
		<li><a href="$basename&action=video&hid=$hid" hidefocus="true">视频</a></li>
		<li><a href="$basename&action=map&hid=$hid" hidefocus="true">地图</a></li>
		<li><a href="$basename&action=pricedetail&hid=$hid" hidefocus="true">价格明细</a></li>
		<li><a href="$basename&action=feed&hid=$hid" hidefocus="true">楼盘动态</a></li>
		<li><a href="$basename&action=colony&hid=$hid" hidefocus="true">关联业主小区</a></li>
		<li class="current"><a href="$_basename" hidefocus="true">关联资讯</a></li>
		<li><a href="$basename&action=nav&hid=$hid" hidefocus="true">自定义导航</a></li>
		<li><a href="admin.php?adminjob=mode&admintype=house_groupbuy&hid=$hid" hidefocus="true">团购管理</a></li>
		<li><a href="admin.php?adminjob=mode&admintype=house_evaluation&hid=$hid&action=score" hidefocus="true">评价管理</a></li>
	</ul>
</div>
<!--
EOT;
if (empty($type)) {print <<<EOT
-->

<h2 class="h1"><span class="mr10 fl">关联资讯模块列表</span></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0" class="mb10">
	<tbody>
		<tr class="tr2">
			<td>模块名称</td>
			<td>操作</td>
		</tr>
<!--
EOT;
foreach ($models as $key=>$value) {
print <<<EOT
-->
		<tr class="tr1 vt">
			<td class="td1">$value[name]</td>
			<td class="td2">
				<a class="mr5" href="$_basename&type=modelcotent&model=$key">[编辑模块内容]</a>
<!--
EOT;
if ($value['relate']) {
print <<<EOT
-->				
				<a class="mr5" href="#" onclick="relateConfig('$key')">[标签设置]</a>
<!--
EOT;
}print <<<EOT
-->
			</td>
		</tr>
<!--
EOT;
}print <<<EOT
-->
	</tbody>
</table>
</div>
<script language="javascript">
function relateConfig(model) {
	var url = "$ajax_basename";
	ajax.send(url,'type=relate&model='+model,ajax.get);
}
</script>
<!--
EOT;
} elseif ($type=='modelcotent'){print <<<EOT
-->


<h2 class="h1">
<span class="mr10 fl">模块内容管理</span>

<!--
EOT;
if ($models[$model]['type']=='image'){print <<<EOT
-->
<span class="fr linka">
	<span>输入图片id：<input id="pushkey" type="text" class="input input_wc"></span>
	<span class="bt2">
		<span><button type="button" onclick="addPush();" onfocus="blur();">添加</button></span>
	</span>
</span>
<!--
EOT;
}else{print <<<EOT
-->
    <span class="fl linka"><a href="javascript:;" class="btn_add" onclick="addPush();"><i>添加</i></a></span>
<!--
EOT;
}print <<<EOT
-->

</h2>
<form action="$_basename&" method="post" name="FORM">
<input type="hidden" name="model" value="$model">
<div class="admin_table mb10">
<table cellspacing="0" cellpadding="0" width="100%" id="ftable">
	<tr  class="tr2 vt">
		<td width="40"><span onclick="CheckAll(document.FORM);" class="cp">全选</span></td>
		<td>位置</td>
		<td>链接地址</td>
		<td>标题</td>
		<td>推送人</td>
		<td>状态</td>
		<td>管理</td>
	</tr>
<!--
EOT;
foreach ($pushs as $key=>$value){print <<<EOT
-->
	<tr id="push_{$key}" class="tr1">
		<td class="td2"><input type="checkbox" name="selid[]" value="$key" /></td>
		<td class="td2">$value[offset]</td>

		<td class="td2">$value[url]</td>
		<td class="td2">$value[title]</td>
		<td class="td2">$value[author]</td>
		<td class="td2">
<!--
EOT;
if($value[iffailure]){print <<<EOT
-->
			<font color="red">停用</font>
<!--
EOT;
}else{print <<<EOT
-->
			启用
<!--
EOT;
}print <<<EOT
-->
</td>
		<td class="td2"><a href="#" class="mr10" onclick="editPush('$key');return false;">[编辑]</a> <a href="#" onclick="delPush('$key');return false;">[删除]</a></td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
</div>
<div class="mb10 cc">
$pages
</div>
<div class="mb10 tac">
	<p class="mb10">操作：
		<input type="radio" checked="" value="open" name="type">启用 
		<input type="radio" value="close" name="type">停用  
		<input type="radio" value="deletes" name="type">删除
	</p>
    <p><span class="bt"><span><button type="button" onclick="CheckAll(document.FORM);" onfocus="blur();">全选</button></span></span>
	<span class="btn"><span><button type="submit" onfocus="blur();">提交</button></span></span></p>
</div>
</form>

<script language="JavaScript">
function editPush(id){
	var url = "$ajax_basename";
	ajax.send(url,'type=edit&id='+id,ajax.get);
}
function addPush(){
	var url = "$ajax_basename";
	var hid = '$hid';
	var model	= '$model';
	var pushkey= 0;
	if (getObj('pushkey')) {
		pushkey = getObj('pushkey').value;
	}
	ajax.send(url,'type=add&model='+model+'&pushkey='+pushkey,ajax.get);
}
function delPush(id){
	if (!confirm("确定要删除此条目吗？")){
		return false;
	}
	var url = "$ajax_basename";
	ajax.send(url,'type=delpush&id='+id,ajax.get);
}


function pickReback(color){
	getObj('color_show').style.backgroundColor = color;
}
function styleOnclick(e,obj){
	var objclass = e.className;
	var temp = objclass.split(' ');
	var newclass = '';
	for (var n=0; n<temp.length; n++){
		if (temp[n]=='one') {
			continue;
		}
		newclass += ' ' + temp[n];
	}
	if (objclass.match(/one/)) {
		e.className = newclass;
		getObj(obj).value = '';
	} else {
		e.className = newclass + ' one';
		getObj(obj).value = 1;
	}
}
function colorCancel(){
	getObj('color_show').style.backgroundColor='#FFFFFF';
	getObj('title1').value='';
}
</script>


<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->